package com.song.study.spring.Config;

import com.song.study.spring.Entity.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @Author ZhangGuisong
 * @Date 2021/4/25-20:55
 */
//使用@PropertySource 来加载外部的配置文件中的属性
@PropertySource("classpath:/person.properties")
@Configuration
public class MainValue {
    @Bean
    public Person person(){
        return new Person();
    }
}
